<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEpisodesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('episodes', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->default('')->comment('剧名');
            $table->integer('blues')->default('1')->comment('总集数');
            $table->integer('sort')->default('0')->comment('排序');
            $table->integer('status')->default('1')->comment('状态');
            $table->text('desc')->nullable()->comment('剧集描述');
            $table->json('type_id')->comment('剧集类型');
            $table->string('unionid')->nullable()->comment('归属');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('episodes');
    }
}
